package nec.aagent.core.service.location;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.location.Location;
import android.location.LocationManager;

public class LocationChangedReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        Intent serviceIntent = new Intent(context, LocationTracerService.class);

        Location location = intent.getParcelableExtra(LocationManager.KEY_LOCATION_CHANGED);
        serviceIntent.putExtra(LocationManager.KEY_LOCATION_CHANGED, location);

        context.startService(serviceIntent);
    }

}
